//
//  String+Extension.swift
//  XingCeHelper
//
//  Created by 申铭 on 2023/2/3.
//

import UIKit

extension String {
    
    /// 打开url
    func openUrl() {
        let url = self.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
        guard let newUrl = URL(string: url) else { return }
        let wk = WKWebViewController()
        wk.urlRequest = URLRequest(url: newUrl)
        UIViewController.currentNavController()?.pushViewController(wk, animated: true)
    }
}
